home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C++ für Kids
/
C++ for kids.iso
/
SETUP
/
US
/
CBUILDER
/
DATA.Z
/
MMSYSTEM.INC
< prev
next >
Wrap
Text File
|
1997-02-13
|
60KB
|
1,488 lines
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; MMSYSTEM.INC - Multimedia assembly language structures & constants
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; C/C++ Run Time Library - Version 8.0
;
; Copyright (c) 1991, 1997 by Borland International
; All Rights Reserved.
;
; If defined, the following flags inhibit inclusion
; of the indicated items:
;
; MMNODRV - Installable driver support
; MMNOSOUND - Sound support
; MMNOWAVE - Waveform support
; MMNOMIDI - MIDI support
; MMNOAUX - Auxiliary audio support
; MMNOTIMER - Timer support
; MMNOJOY - Joystick support
; MMNOMCI - MCI support
; MMNOMMIO - Multimedia file I/O support
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; General constants and data types
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; general constants
MAXPNAMELEN equ 32 ; max product name length (including NULL)
MAXERRORLENGTH equ 128 ; max error text length (including NULL)
; MMTIME data structure
MMTIME struc
mmt_wType dw ? ; indicates the contents of the union
mmt_TimeUnion dd ? ; union
MMTIME ends
SMPTE struc
smpte_hour db ? ; hours
smpte_min db ? ; minutes
smpte_sec db ? ; seconds
smpte_frame db ? ; frames
smpte_fps db ? ; frames per second
smpte_reserved db ? ; pad
SMPTE ends
; types for wType field in MMTIME struct
TIME_MS equ 0001h ; time in milliseconds
TIME_SAMPLES equ 0002h ; number of wave samples
TIME_BYTES equ 0004h ; current byte offset
TIME_SMPTE equ 0008h ; SMPTE time
TIME_MIDI equ 0010h ; MIDI time
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Multimedia Extensions Window Messages
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MM_JOY1MOVE equ 3A0h ; joystick
MM_JOY2MOVE equ 3A1h
MM_JOY1ZMOVE equ 3A2h
MM_JOY2ZMOVE equ 3A3h
MM_JOY1BUTTONDOWN equ 3B5h
MM_JOY2BUTTONDOWN equ 3B6h
MM_JOY1BUTTONUP equ 3B7h
MM_JOY2BUTTONUP equ 3B8h
MM_MCINOTIFY equ 3B9h ; MCI
MM_MCISYSTEM_STRING equ 3CAh
MM_WOM_OPEN equ 3BBh ; waveform output
MM_WOM_CLOSE equ 3BCh
MM_WOM_DONE equ 3BDh
MM_WIM_OPEN equ 3BEh ; waveform input
MM_WIM_CLOSE equ 3BFh
MM_WIM_DATA equ 3C0h
MM_MIM_OPEN equ 3C1h ; MIDI input
MM_MIM_CLOSE equ 3C2h
MM_MIM_DATA equ 3C3h
MM_MIM_LONGDATA equ 3C4h
MM_MIM_ERROR equ 3C5h
MM_MIM_LONGERROR equ 3C6h
MM_MOM_OPEN equ 3C7h ; MIDI output
MM_MOM_CLOSE equ 3C8h
MM_MOM_DONE equ 3C9h
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; String resource number bases (internal use)
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
MMSYSERR_BASE equ 0
WAVERR_BASE equ 32
MIDIERR_BASE equ 64
TIMERR_BASE equ 96
JOYERR_BASE equ 160
MCIERR_BASE equ 256
MCI_STRING_OFFSET equ 512
MCI_VD_OFFSET equ 1024
MCI_CD_OFFSET equ 1088
MCI_WAVE_OFFSET equ 1152
MCI_SEQ_OFFSET equ 1216
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; General error return values
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; general error return values
MMSYSERR_NOERROR equ 0 ; no error
MMSYSERR_ERROR equ (MMSYSERR_BASE + 1) ; unspecified error
MMSYSERR_BADDEVICEID equ (MMSYSERR_BASE + 2) ; device ID out of range
MMSYSERR_NOTENABLED equ (MMSYSERR_BASE + 3) ; driver failed enable
MMSYSERR_ALLOCATED equ (MMSYSERR_BASE + 4) ; device already allocated
MMSYSERR_INVALHANDLE equ (MMSYSERR_BASE + 5) ; device handle is invalid
MMSYSERR_NODRIVER equ (MMSYSERR_BASE + 6) ; no device driver present
MMSYSERR_NOMEM equ (MMSYSERR_BASE + 7) ; memory allocation error
MMSYSERR_NOTSUPPORTED equ (MMSYSERR_BASE + 8) ; function isn't supported
MMSYSERR_BADERRNUM equ (MMSYSERR_BASE + 9) ; error value out of range
MMSYSERR_INVALFLAG equ (MMSYSERR_BASE + 10) ; invalid flags passed
MMSYSERR_INVALPARAM equ (MMSYSERR_BASE + 11) ; invalid parameter passed
MMSYSERR_LASTERROR equ (MMSYSERR_BASE + 11) ; last error in range
ifndef MMNODRV
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Installable driver support
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DRV_MCI_FIRST equ DRV_RESERVED
DRV_MCI_LAST equ (DRV_RESERVED + 0FFFh)
endif ;ifndef MMNODRV
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Driver callback support
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; flags used with waveOutOpen(), waveInOpen(), midiInOpen(), and
; midiOutOpen() to specify the type of the dwCallback parameter.
CALLBACK_TYPEMASK equ 00070000h ; callback type mask
CALLBACK_NULL equ 00000000h ; no callback
CALLBACK_WINDOW equ 00010000h ; dwCallback is a HWND
CALLBACK_TASK equ 00020000h ; dwCallback is a HTASK
CALLBACK_FUNCTION equ 00030000h ; dwCallback is a FARPROC
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Manufacturer and product IDs
;
; Used with wMid and wPid fields in WAVEOUTCAPS, WAVEINCAPS,
; MIDIOUTCAPS, MIDIINCAPS, AUXCAPS, JOYCAPS structures.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; manufacturer IDs
MM_MICROSOFT equ 1 ; Microsoft Corp.
; product IDs
MM_MIDI_MAPPER equ 1 ; MIDI Mapper
MM_WAVE_MAPPER equ 2 ; Wave Mapper
MM_SNDBLST_MIDIOUT equ 3 ; Sound Blaster MIDI output port
MM_SNDBLST_MIDIIN equ 4 ; Sound Blaster MIDI input port
MM_SNDBLST_SYNTH equ 5 ; Sound Blaster internal synthesizer
MM_SNDBLST_WAVEOUT equ 6 ; Sound Blaster waveform output
MM_SNDBLST_WAVEIN equ 7 ; Sound Blaster waveform input
MM_ADLIB equ 9 ; Ad Lib-compatible synthesizer
MM_MPU401_MIDIOUT equ 10 ; MPU401-compatible MIDI output port
MM_MPU401_MIDIIN equ 11 ; MPU401-compatible MIDI input port
MM_PC_JOYSTICK equ 12 ; Joystick adapter
ifndef MMNOSOUND
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; Sound support
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; flag values for wFlags parameter
SND_SYNC equ 0000h ; play synchronously (default)
SND_ASYNC equ 0001h ; play asynchronously
SND_NODEFAULT equ 0002h ; don't use default sound
SND_MEMORY equ 0004h ; lpszSoundName points to a memory file
SND_LOOP equ 0008h ; loop the sound until next sndPlaySound
SND_NOSTOP equ 0010h ; don't stop any currently playing sound
endif ;ifndef MMNOSOUND
ifndef MMNOWAVE
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; W